<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<% 
String path = request.getContextPath(); //跳转后样式丢失问题
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 	
%>
<!DOCTYPE html>
<html>
<head>
    <title>用户/商家管理</title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="<%=path%>/background/style/resource/Css/bootstrap.css" />
   	<link rel="stylesheet" href="<%=path%>/background/style/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="<%=path%>/background/style/resource/Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="<%=path%>/background/style/resource/Css/style.css" />
    <link rel="stylesheet" type="text/css" href="<%=path%>/background/style/css/sweetalert.css"/>
    <script type="text/javascript" src="<%=path%>/background/style/resource/Js/jquery.js"></script>
    <script type="text/javascript" src="<%=path%>/background/style/resource/Js/jquery.sorted.js"></script>
    <script type="text/javascript" src="<%=path%>/background/style/resource/Js/bootstrap.js"></script>
    <script type="text/javascript" src="<%=path%>/background/style/resource/Js/ckform.js"></script>
    <script type="text/javascript" src="<%=path%>/background/style/resource/Js/common.js"></script>
	<script type="text/javascript" src="<%=path%>/background/style/js/sweetalert.min.js"></script>
	<script type="text/javascript" src="<%=path%>/background/style/js/sweetalert-dev.js"></script>
  	 <script type="text/javascript" src="<%=path%>/background/style/js/nav.js"></script>
  	<script type="text/javascript" src="<%=path%>/background/style/js/user.js"></script>
    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }
		.table  th{
			text-align:center;
		}
		.table td{
			text-align:center;
		}

    </style>
</head>
<body>
<form class="form-inline definewidth m20">  
    用户名：
    <input type="text" name="name" id="username"class="abc input-default" placeholder="输入姓名">&nbsp;&nbsp;  
    <input type="button" class="btn btn-primary" onclick="getUserByName()" value="查询"/>&nbsp;&nbsp; <button type="button" class="btn btn-success" id="addnew">添加用户</button>
</form>
<table class="table table-bordered table-hover definewidth m10" >
    <thead>
    <tr>
        <th>ID</th>
        <th>姓名</th>
        <th>性别</th>
        <th>生日</th>
		<th>电话号码</th>
        <th>星级</th>
		<th>注册时间</th>
		<th style="display:none;">是否商家</th>
		<th>操作</th>
    </tr>
    </thead>
	<tbody id="tbody">
	</tbody>
	</table>
	<!-- 分页导航 -->
	<div class="pagination" style="margin-left:150px;"></div>
</body>
<script>
    $(function () {  
		$('#addnew').click(function(){
				window.location.href="addUser.jsp";
		 });
    });

	function del(id)
	{	
		if(confirm("确定要删除吗？"))
		{
			var url = "userManager.jsp";		
			window.location.href=url;		
		}
	}
</script>
</html>
